﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GKS.Math.LinearAlgebra {
    public class Vector<T> {
        #region variables
        private Matrix<T> coordinates;
        #endregion

        #region properties
        public int Dimension { get; private set; }
        public T this[int index] {
            get {
                T element;

                lock (coordinates) {
                    element = coordinates[index, 0];
                }

                return element;
            }
            set {
                lock (coordinates) {
                    coordinates[index, 0] = value;
                }
            }
        }
        #endregion

        #region enums

        #endregion

        #region constructors
        public Vector(int dimension) {
            if (dimension < 0) {
                throw new ArgumentOutOfRangeException("dimension", "The dimension of the vector must be at least 0.");
            }

            Dimension = dimension;
            coordinates = new Matrix<T>(rows: dimension, columns: 1);
        }
        #endregion

        #region methods

        #endregion
    }
}
